package com.atguigu.flink.chapter05.Source;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;

/**
 * TODO 读文件
 *
 * @author cjp
 * @version 1.0
 * @date 2021/8/7 16:31
 */
public class Flink02_Collection {
    public static void main(String[] args) throws Exception {
        // 0. 执行环境
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);

        // 1.读取数据: 可以读目录
        env
//                .fromCollection(Arrays.asList(1, 2, 3, 4, 5, 5, 76, 8,213,312,3432,14,3125,1324,3124,3124,3124))
                .fromElements(1,2,3,4,5,6354,7,7654,7634,653,34,654,6534,3456)
                .print();


        env.execute();


    }
}
